// NEW
$height-input: 40px;

.diary-edit{
  background-color: $bg-light;
  display: flex;
  flex-flow: row nowrap;
}

// 编辑器
textarea{
  width: 100%;
  display: block;
  line-height: 1.5;
  padding: 15px 20px;
  border: 1px solid $color-border;
  @include transition(box-shadow 0.5s);
  @include transition(-webkit-box-shadow 0.5s);
  @include border-radius($radius-pc);
  &.title{
    margin-bottom: 15px;
    //@include border-radius($radius-pc $radius-pc 0 0);
  }
  &.content{
    @include border-radius($radius-pc);
  }
  &:focus{
    border-color: $color-border-highlight;
    @include box-shadow(0 0 0 3px rgba(black, 0.1));
    @include transition(box-shadow 0.5s);
    @include transition(-webkit-box-shadow 0.5s);
  }
}
.editor-container{
  margin-right: 20px;
  flex-grow: 1;
  .editor-title{
    textarea{
      resize: none;
      font-size: 1.1rem;
    }
  }
  .editor-content{
    textarea{
      overflow-x: hidden;
      overflow-y: scroll;
      font-family: "Consolas", "Monaco", sans-serif;
      resize: vertical;
      height: 220px;
      font-size: 1rem;
      &::-webkit-scrollbar {
        z-index: 50;
        width: 8px;
      }
      &::-webkit-scrollbar-track {
        background-color: rgba(0, 0, 0, 0);
      }
      &::-webkit-scrollbar-thumb {
        border: 1px solid #cbcbcb;
      }
    }
  }
}

// 日记 meta
.meta-container{
  width: 30%;
  .editor-form-input{
    background-color: white;
    padding: 10px;
    @include border-radius($radius-pc);
    overflow: hidden;
    justify-content: space-between;
    display: flex;
    flex-flow: row wrap;
    .editor-input-item{
      width: 100%;
      align-items: center;
      justify-content: space-between;
      display: flex;
      font-size: $fz-label;
      padding: 0 10px;
      border-bottom: 1px solid $bg-light;
      label{
        white-space: nowrap;
        @extend .unselectable;
        color: $text-label;
        line-height: $height-input;
      }
      input{
        flex-grow: 1;
        padding: 6px 0;
        text-align: right;
        background-color: transparent;
        line-height: $height-input - 6*2;
      }
      .input{
        padding: 6px 0;
      }
      &:last-child{
        border-bottom: none;
      }
    }
  }
  .editor-form-category{
  }
  .editor-form-weather{
  }
}

// PC
@media (min-width: $grid-separate-width-big){
  .diary-edit{
    flex-flow: row nowrap;
    padding: 20px;
  }
  .meta-container{
    width: 350px;
    display: flex;
    flex-flow: column wrap;
    align-items: flex-start;
    justify-content: flex-start;
    > * {
      margin-bottom: 20px;
    }
  }
  .editor-form{
    flex-flow: column nowrap;
    align-items: flex-start;
    > * {
      width: 100%;
      flex-grow: 1;
      margin-bottom: 10px;
    }
    .editor-input-item{
      margin-bottom: 5px;
      height: auto;
      padding: 5px 20px;
      &:last-child{
        margin-bottom: 0;
      }
    }
  }

}

// IPAD
@media (min-width: $grid-separate-width-md) and (max-width: $grid-separate-width-big) {
  .diary-edit{
    flex-flow: column nowrap;
    padding: 20px;
  }
  .editor-container{
    margin-right: 0;
    margin-bottom: 15px;
    flex-grow: 0;
  }
  .meta-container{
    width: 100%;
    flex-flow: row wrap;
    > * {
      margin-bottom: 15px;
    }
  }
}


// MOBILE
@media (max-width: $grid-separate-width-md) {
  textarea {
    padding: 10px 15px;
  }
  .diary-edit {
    flex-flow: column nowrap;
    padding: 10px;
  }
  .editor-container{
    margin-right: 0;
    margin-bottom: 15px;
    flex-grow: 0;
  }
  .meta-container{
    width: 100%;
    flex-flow: row wrap;
    > * {
      margin-bottom: 15px;
    }
  }
}

